package user

import (
	"gitee.com/binny_w/gin_starter/core"
	"github.com/gin-gonic/gin"
	"go.uber.org/zap"
)

func afterDelete(c *gin.Context) {
	c.Next()
	if id := c.Param("id"); id != "" {
		if err := core.Rbac.DeleteUsers("user:" + id); err != nil {
			core.Logger.Error("fail to delete user", zap.String("id", id), zap.Error(err))
		}
	}
}
